//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package come.tool.JDialog;

import com.tool.role.RoleData;
import com.tool.role.RoleProperty;
import java.math.BigDecimal;
import org.come.Frame.ZhuFrame;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;
import org.come.until.SendRoleAndRolesummingUntil;
import org.come.until.UserData;
import org.skill.frame.SkillMainFrame;

public class washPointJDialog implements TiShiChuLi {
	public washPointJDialog() {
	}

	@Override
    public void tipBox(boolean tishi, Object object) {
		if (tishi) {
			if (object instanceof String) {
				if (RoleData.getRoleData().getLoginResult().getGold().compareTo(new BigDecimal(500000)) < 0) {
					ZhuFrame.getZhuJpanel().addPrompt2("金钱不足");
					return;
				}

				String mes = Agreement.getAgreement().rolechangeAgreement((String)object);
				SendMessageUntil.toServer(mes);
			} else {
				int dian = (Integer)object;
				if (UserData.uptael((long)dian)) {
					RoleData.getRoleData().getPrivateData().setSkills("T", (String)null);
					SendRoleAndRolesummingUntil.sendRole(RoleData.getRoleData().getPrivateData());
					RoleProperty.ResetEw();
					SkillMainFrame.getSkillMainFrame().getSkillMainPanel().changeBtnPanel(1);
				}
			}
		}

	}
}
